package zuoye2;

import sun.plugin2.message.JavaScriptCallMessage;

import java.util.Scanner;

public class Zy3 {
    public static void main(String[] args) {
        int x = (int) (Math.random() * 10)+1;
        System.out.println("随机数已产生，请猜数字吧！");
        Scanner sc=new Scanner(System.in);
        int num=sc.nextInt();
        while (x!=num){
            if(num>x){
                System.out.println("猜大了");
                System.out.println("继续猜吧！");
                Scanner sr=new Scanner(System.in);
            }else{
                System.out.println("猜小了");
            }
            System.out.println("继续猜吧！");
            num=sc.nextInt();
        }
        System.out.println("恭喜你，猜对了！");
    }
}
